<div class="col-sm-12 mt20">

    <div class="panel panel-default">
        <div class="panel-body" ng-keyup="myKeyup($event)">
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="产品名称" ng-model="searchform.name">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="产品编号" ng-model="searchform.product_code">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="period_start.value" is-open="period_start.opened"
                    ng-click="dateOpen($event, period_start)" placeholder="开始时间" ng-required="true" close-text="关闭" current-text="今天"
                    clear-text="清除" readonly/>
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="period_end.value" is-open="period_end.opened"
                    ng-click="dateOpen($event, period_end)" placeholder="结束时间" ng-required="true" close-text="关闭" current-text="今天"
                    clear-text="清除" readonly/>
            </div>
            <div class="col-sm-2">
                <button class="btn btn-success search btn-block" ng-click="info()">创建场次</button>
            </div>
            <div class="col-sm-2">
                <button class="btn btn-info search btn-block" ng-click="loadlist()">立即搜索</button>
            </div>
        </div>

        <div class="panel-body">
            <table class="table table-striped table-bordered dataTable table-condensed tree_table" style="table-layout:fixed">
                <thead>
                    <tr>
                        <th class="col-md-1 text-center">电影</th>
                        <th class="col-md-1 text-center">场所/房间</th>
                        <th class="col-md-2 text-center">开始/结束</th>
                        <th class="col-md-1 text-center">一次最多购买数量</th>
                        <th class="col-md-1 text-center">支付超时时间（分钟）</th>
                        <th class="col-md-1 text-center">状态/座位</th>
                        <th class="col-md-2 text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="times in timesList">
                        <td class="text-center">{{times.product_name}}</td>
                        <td class="text-center">
                            {{times.place_name}}
                            <br />{{times.room_name}}
                        </td>
                        <td class="text-center">
                            {{times.show_time_start}}
                            <br />{{times.show_time_end}}
                        </td>
                        <td class="text-center">{{times.max_seat_num}}</td>
                        <td class="text-center">{{times.pay_overtime}}</td>
                        <td class="text-center">
                            {{times.state == '0'? '新建': times.state == '1'? '上架': '下架'}}
                            <br />{{times.is_seat == '0'? '未生成': '已生成'}}
                        </td>
                        <td class="text-center">
                            <button type="button" class="btn btn-success btn-xs" ng-click="createLayout(times)" ng-if="times.is_seat == '0'">生成布局</button>
                            <button type="button" class="btn btn-primary btn-xs" ng-click="timesLayout(times)" ng-if="times.is_seat != '0'">场次布局</button>
                            <button type="button" class="btn btn-success btn-xs" ng-click="setUp(times)" ng-if="times.state != '1'">上架</button>
                            <button type="button" class="btn btn-warning btn-xs" ng-click="setDown(times)" ng-if="times.state == '1'">下架</button>
                            <button type="button" class="btn btn-info btn-xs" ng-click="info(times)">查看</button>
                            <button type="button" class="btn btn-danger btn-xs" ng-click="delete(times)">删除</button>
                        </td>
                    </tr>
                    <tr ng-if="movieList.length == 0">
                        <td colspan="10" class="text-center">
                            没有数据
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="text-right" style="background-color: white; margin-right: 30px">
            <pagination total-items="totalItems" ng-model="currentPage" ng-change="loadlist()" previous-text="上一页" next-text="下一页" first-text="首页"
                last-text="尾页" max-size="5" boundary-links="true" rotate="false" items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
        </div>

    </div>
</div>